<template>
  <div class="label-box-content">
    <el-row :gutter="20" type="flex">
      <el-col :span="5" class="expertsCategory">
        <NewCard title="专家名单" :border="false">
          <div class="leftMenu">
            <div class="leftSearch">
              <el-select
                @change="selectChangeFn"
                v-model="filterText"
                filterable
                clearable
                placeholder="请选择">
                <el-option value="0" label="未审核"></el-option>
                <el-option value="1" label="审核成功"></el-option>
                <el-option value="2" label="审核失败"></el-option>
              </el-select>
            </div>

            <!-- ------------------------2咨询专家------------------------ -->
            <el-collapse v-model="activeTabClass">
              <el-collapse-item :title="`咨询专家（${consultFList && consultFList.length}）`" name="0">
                <el-menu class="el-menu-vertical-demo" ref="elMenu" v-if="consultFList && consultFList.length">
                  <el-menu-item
                    v-for="(item, index) in consultFList"
                    :key="item.id"
                    :index="index.toString()"
                    @click="selectId(item.id)"
                  >
                    <span slot="title">
                      {{ item.name }}
                      <span class="auditTxt">
                        <i
                          v-if="item.status === '1' ? true : false"
                          class="el-icon-success"
                        ></i>
                        <i
                          v-else-if="item.status === '2' ? true : false"
                          class="el-icon-error"
                        ></i>
                        <i v-else class="el-icon-warning"></i>
                      </span>
                    </span>
                  </el-menu-item>
                </el-menu>
                <p v-else class="classifyEmpty">暂无咨询专家</p>
              </el-collapse-item>
              <!-- ------------------------2咨询专家------------------------end -->

              <!-- ------------------------3项目专家------------------------ -->
              <el-collapse-item :title="`项目专家（${projectFList && projectFList.length}）`" name="1">
                <el-menu class="el-menu-vertical-demo" ref="elMenu" v-if="projectFList && projectFList.length">
                  <el-menu-item
                    v-for="(item, index) in projectFList"
                    :key="item.id"
                    :index="index.toString()"
                    @click="selectId(item.id)"
                  >
                    <span slot="title">
                      {{ item.name }}
                      <span class="auditTxt">
                        <i
                          v-if="item.status === '1' ? true : false"
                          class="el-icon-success"
                        ></i>
                        <i
                          v-else-if="item.status === '2' ? true : false"
                          class="el-icon-error"
                        ></i>
                        <i v-else class="el-icon-warning"></i>
                      </span>
                    </span>
                  </el-menu-item>
                </el-menu>
                <p v-else class="classifyEmpty">暂无项目专家</p>
              </el-collapse-item>
            </el-collapse>
            <!-- ------------------------3项目专家------------------------end -->

          </div>
        </NewCard>
      </el-col>
      <el-col :span="filterText == '0' ? 14:19">
        <div class="infoExpert">
          <NewCard title="专家信息">
            <div class="perInfo">
              <el-row>
                <el-col :span="24">
                  <div class="expertInfoImg">
                    <el-avatar
                      :size="70"
                      src="https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png"
                      v-if="
                        selectExpertInfo.avatar == '' ||
                        selectExpertInfo.avatar == undefined
                      "
                    ></el-avatar>
                    <img :src="selectExpertInfo.avatar" alt="" v-else />
                    <h1>{{ selectExpertInfo.name}}</span></h1>
                  </div>
                </el-col>
                <el-col :span="24">
                  <div class="info-box">
                    <h3>基本信息</h3>
                    <ul>
                      <li>
                        <span>手机号码</span>
                        <p>{{ selectExpertInfo.phonenumber }}</p>
                      </li>
                      <li>
                        <span>性别</span>
                        <p>
                          <template v-if="selectExpertInfo.sex == '0'">男</template>
                          <template v-if="selectExpertInfo.sex == '1'">女</template>
                          <template v-if="selectExpertInfo.sex == '2'">未知</template>
                        </p>
                      </li>
                      <li>
                        <span>年龄</span>
                        <p>{{ getAge }}</p>
                      </li>
                      <li>
                        <span>生日</span>
                        <p>{{selectExpertInfo.birthday}}</p>
                      </li>
                      <li>
                        <span>所在地区</span>
                        <p>{{ province }}{{ city }}{{location}}</p>
                      </li>
                      <li v-if="selectExpertInfo.type == '3'">
                        <span>服务地区</span>
                        <p>
                          <!-- 无限制和镇不可选 -->
                          <el-input v-model="noSelectValue" placeholder="全国" disabled v-if="areaType == '1'"></el-input>
                          <el-cascader
                            size="large"
                            :popper-class="areaType=='4' ? 'selectArea':''"
                            :options="serviceCity"
                            :props="optionProps"
                            :show-all-levels="false"
                            v-model="selectServiceCity"
                            placeholder="选择服务地区"
                            @expand-change="expandChangeArea"
                            @change="handleServiceCity"
                            v-else>
                          </el-cascader>
                        </p>
                      </li>
                      <li>
                        <span>个人描述</span>
                        <p>{{ selectExpertInfo.describable }}</p>
                      </li>
                    </ul>
                  </div>
                </el-col>
                <el-col :span="24">
                  <div class="info-box">
                    <h3>职业信息</h3>
                    <ul>
                      <li>
                        <span>咨询类型</span>
                        <p>{{ selectExpertInfo.site=='0'?'图文咨询':'现场咨询' }}</p>
                        <!-- <p>
                          <el-select v-model="selectExpertInfo.site" placeholder="请选择咨询类型">
                            <el-option label="图文咨询" value="0"></el-option>
                            <el-option label="现场咨询" value="1"></el-option>
                          </el-select>
                        </p> -->
                      </li>
                      <li>
                        <span>绑定实体</span>
                        <p>
                          <el-select v-model="selectExpertInfo.organizationIds" multiple placeholder="请选择实体" @change="changeOrganization">
                            <el-option
                              :value="entity.id"
                              :label="entity.name"
                              v-for="(entity, index) in entityList"
                              :key="index.toString()"
                            ></el-option>
                          </el-select>
                        </p>
                      </li>
                      <li>
                        <span>专家类型</span>
                        <p>{{ getTypeName }}</p>
                      </li>
                      <!-- 咨询、编辑专家的擅长领域 -->
                      <li v-if="selectExpertInfo.skilledList">
                        <span>擅长领域</span>
                        <p>
                          <span 
                            v-for="(skilled, index) in selectExpertInfo.skilledList"
                            :key="index.toString()">
                            {{ skilled.name }}、
                          </span>
                          <!-- 添加删除领域按钮 -->
                          <i class="el-icon-circle-plus-outline" @click="addGoodField"></i>
                        </p>
                      </li>
                      <!-- 项目专家的擅长领域 -->
                      <li v-else>
                        <span>擅长领域</span>
                        <p>
                          <span 
                            v-for="(project, index) in selectExpertInfo.projectRuleList"
                            :key="index.toString()">
                            {{ project.name }}、
                          </span>
                          <!-- 添加删除领域按钮 -->
                          <i class="el-icon-circle-plus-outline" @click="addGoodField"></i>
                        </p>
                      </li>
                      <li v-if="selectExpertInfo.type != '3'">
                        <span>专家等级</span>
                        <p v-if="filterText == '0'">{{selectExpertInfo.levelName}}</p>
                        <p v-else>
                          <el-select v-model="selectExpertInfo.level" placeholder="请选择专家等级" @change="handleLevel">
                            <el-option
                              :value="level.id"
                              :label="level.levelName"
                              v-for="(level, index) in levelList"
                              :key="index.toString()"
                            ></el-option>
                          </el-select>
                        </p>
                      </li>
                      <li>
                        <span>专家职称</span>
                        <p v-if="filterText == '0'">{{selectExpertInfo.officeName}}</p>
                        <p v-else>
                          <el-select v-model="selectExpertInfo.officeId" placeholder="请选择专家职称" @change="handleOffice">
                            <el-option
                              :value="office.id"
                              :label="office.name"
                              v-for="(office, index) in officeList"
                              :key="index.toString()"
                            ></el-option>
                          </el-select>
                        </p>
                      </li>
                      <li>
                        <span>跟单</span>
                        <p v-if="filterText == '0'">{{ getDocumentaryName() }}</p>
                        <p v-else>
                          <el-select v-model="selectExpertInfo.followId" placeholder="请选择跟单" @change="handleDocumentary">
                            <el-option
                              :value="level.userId"
                              :label="level.userName"
                              v-for="(level, index) in documentaryList"
                              :key="index.toString()"
                            ></el-option>
                          </el-select>
                        </p>
                      </li>
                    </ul>
                  </div>
                </el-col>
                <el-col :span="24">
                  <div class="info-box">
                    <h3>个人证书</h3>
                    <ul
                      v-for="(Cert, index) in selectExpertInfo.expertCertificateList"
                      :key="index.toString()">
                      <h4>证书{{index+1}}</h4>
                      <li>
                        <span>证书名称</span>
                        <p>{{Cert.name}}</p>
                      </li>
                      <li>
                        <span>证书编号</span>
                        <p>{{Cert.no}}</p>
                      </li>
                    </ul>
                  </div>
                </el-col>

                <el-col :span="24">
                  <div class="info-box">
                    <h3>工作经历</h3>
                    <ul
                      v-for="(work, index) in selectExpertInfo.expertWorkList"
                      :key="index.toString()">
                      <h4>工作经历{{index+1}}</h4>
                      <li>
                        <span>公司名称</span>
                        <p>{{work.company}}</p>
                      </li>
                      <li>
                        <span>在职时间</span>
                        <p>{{ work.startTime }} ~ {{ work.endTime }}</p>
                      </li>
                      <li>
                        <span>职务名称</span>
                        <p>{{work.postion}}</p>
                      </li>
                      <li>
                        <span>工作描述</span>
                        <p>{{work.job}}</p>
                      </li>
                    </ul>
                  </div>
                </el-col>
                <el-col :span="24">
                  <div class="info-box">
                    <h3>教育经历</h3>
                    <ul
                      v-for="(educa, index) in selectExpertInfo.expertEducationList"
                      :key="index.toString()">
                      <h4>教育经历{{index+1}}</h4>
                      <li>
                        <span>学校名称</span>
                        <p>{{ educa.school }}</p>
                      </li>
                      <li>
                        <span>学历</span>
                        <p>
                          <template v-if="educa.type == '1'">专科</template>
                          <template v-else-if="educa.type == '2'">本科</template>
                          <template v-else-if="educa.type == '3'">硕士</template>
                          <template v-else>博士</template>
                        </p>
                      </li>
                      <li>
                        <span>专业</span>
                        <p>{{ educa.major }}</p>
                      </li>
                      <li>
                        <span>在校时间</span>
                        <p>{{ educa.startTime }} ~ {{ educa.endTime }}</p>
                      </li>
                    </ul>
                  </div>
                </el-col>
                <el-col :span="24">
                  <div class="info-box">
                    <h3>相关附件</h3>
                    <p
                      class="file-p"
                      v-for="(file, index) in selectExpertInfo.expertFileList"
                      :key="index.toString()">
                      <i class="el-icon-paperclip"></i> {{ file.name }}
                      <!-- <b class="showImg">
                        <el-button type="text" class="fileBtn">查看</el-button>
                        <el-image :src="file.url" :preview-src-list="[file.url]">
                        </el-image>
                      </b> -->
                      <a :href="file.url" target="_blank" class="fileBtn">下载</a>
                    </p>
                  </div>
                </el-col>
              </el-row>
            </div>
          </NewCard>
        </div>
      </el-col>
      <el-col :span="5" v-if="filterText == '0'">
        <NewCard title="专家审核">
          <div class="expertRev">
            <el-form
              ref="form"
              :model="auditResult"
              :rules="rules"
              label-position="top"
              v-show="currentStatus">
              <el-form-item
                label="审核结果"
                style="margin-bottom: 15px"
                required
                prop="status">
                <el-radio-group
                  @change="auditResultStatusChange"
                  v-model="auditResult.status"
                  required>
                  <el-radio label="1" :disabled="!selectExpertInfo.id">通过</el-radio>
                  <el-radio label="2" :disabled="!selectExpertInfo.id">失败</el-radio>
                </el-radio-group>
              </el-form-item>
              <!-- <el-form-item
                prop="permission"
                label="评论"
                v-if="auditResult.status == '1'"
                required>
                <el-radio-group v-model="auditResult.permission">
                  <el-radio label="0">是</el-radio>
                  <el-radio label="1">否</el-radio>
                </el-radio-group>
              </el-form-item> -->

              <el-form-item
                prop="officeId"
                label="职称"
                v-if="auditResult.status == '1'"
                required>
                <el-select
                  v-model="auditResult.officeId"
                  placeholder="请选择职称">
                  <el-option
                    :value="office.id"
                    :label="office.name"
                    v-for="(office, index) in officeList"
                    :key="index.toString()"
                  ></el-option>
                </el-select>
              </el-form-item>

              <el-form-item
                prop="level"
                label="等级"
                v-if="auditResult.status == '1' && selectExpertInfo.type != '3'"
                required>
                <el-select v-model="auditResult.level" placeholder="请选择等级">
                  <el-option
                    :value="level.id"
                    :label="level.levelName"
                    v-for="(level, index) in levelList"
                    :key="index.toString()"
                  ></el-option>
                </el-select>
              </el-form-item>

              <el-form-item
                prop="followId"
                label="跟单"
                v-if="auditResult.status == '1'"
                required>
                <el-select v-model="auditResult.followId" placeholder="请选择跟单">
                  <el-option
                    :value="level.userId"
                    :label="level.userName"
                    v-for="(level, index) in documentaryList"
                    :key="index.toString()"
                  ></el-option>
                </el-select>
              </el-form-item>

              <el-form-item
                prop="remark"
                label="审核通知"
                class="opinion"
                v-if="auditResult.status == '1'">
                <el-select
                  v-model="auditResult.remark"
                  placeholder="请选择内容"
                  @change="changeMessage">
                  <el-option
                    :value="message.id"
                    :label="message.title"
                    v-for="(message, index) in messageTemp"
                    :key="index.toString()"
                  ></el-option>
                </el-select>
                <el-input
                  type="textarea"
                  :rows="4"
                  placeholder="审核通知内容"
                  v-model="getMessage"
                >
                </el-input>
              </el-form-item>
              <!-- <el-form-item
                  prop="type"
                  label="编辑状态"
                  class="opinion"
                  v-if="auditResult.status == '0'"
                >
                  <el-radio v-model="auditResult.type" label="1">编辑</el-radio>
                  <el-radio v-model="auditResult.type" label="2">咨询</el-radio>
                </el-form-item> -->
              <!-- <el-form-item
                  v-if="auditResult.status == '0' && auditResult.type == 2"
                  prop="type"
                  label="日限"
                  class="opinion"
                >
                  <el-input
                    v-for="(skilledItem, index) in selectExpertInfo.skilledList"
                    :key="skilledItem.id"
                    placeholder="请输入日限"
                    v-model="auditResult.skilledList[index].quota"
                  >
                    <template slot="prepend">{{ skilledItem.name }}</template>
                  </el-input>
                </el-form-item> -->

              <el-form-item
                prop="remark"
                label="审核意见"
                class="opinion"
                v-if="auditResult.status == '2'"
              >
                <el-select
                  v-model="auditResult.remark"
                  placeholder="请选择内容"
                  @change="changeRemark"
                >
                  <el-option
                    :value="message.id"
                    :label="message.title"
                    v-for="(message, index) in loseTemp"
                    :key="index.toString()"
                  ></el-option>
                </el-select>
                <el-input
                  type="textarea"
                  :rows="4"
                  placeholder="审核意见内容"
                  v-model="getRemark"
                >
                </el-input>
              </el-form-item>

              <!-- <el-form-item>
                <el-button type="primary" @click="expertEdit">确认</el-button>
              </el-form-item> -->
            </el-form>
            <SubBtn v-if="auditResult.status != '0'">
              <template slot="btn">
                  <el-button type="primary" round @click="expertEdit" :disabled="!isCheck">确认</el-button>
              </template>
            </SubBtn>
          </div>
        </NewCard>
      </el-col>
    </el-row>

    <!-- 添加擅长领域 -->
    <Comdrawer
      size="60%"
      :title="selectExpertInfo.type=='2'?'咨询类专家':'项目类专家'"
      :drawer="goodFieldShow"
      @eventColse="goodFieldColse">
      <EditGoodField :selectExpertInfo="selectExpertInfo" :selectProjectTypeOne="selectProjectTypeOne" :filterText="filterText"></EditGoodField>
    </Comdrawer>
    <!-- 添加擅长领域 end -->
  </div>
</template>

<script>
import NewCard from "@/wss/components/newCard.vue";
import SubBtn from "@/wss/components/subBtn.vue";
import Comdrawer from "@/wss/components/Comdrawer.vue";
import EditGoodField from "@/wss/newViews/BK/hr/editGoodField.vue"

import { getSkilledSelectSkilledApi } from "@/wss/newApi_3-24/work/skilled.js";
import { UrltoFile,getFileFromUrl } from "@/wss/utils/wss.js";
import debounce from "lodash/debounce";

import {getInfo} from "@/api/login.js"
import {getRouters} from "@/api/menu.js"
import {
  getExpertListApi,
  getExpertInfoApi,
  getExpertOfficeListApi,
  getUserLevelListApi,
  getExpertEditApi,
  getMessageTempListApi,
  editUpdateExpertApi,
} from "@/wss/newApi_3-24/work/expert.js";
import { getPrganizationlist_managerApi } from "@/wss/newApi_3-24/base/organization.js";
import { getdocumentaryApi } from "@/wss/newApi_3-24/BK/hr/documentary.js";

import {getProjectTypeGetInfoApi} from "@/wss/newApi_3-24/work/projectType.js";

//引入省市区数据的插件
// provinceAndCityData是省市二级联动数据（不带“全部”选项） regionData是省市区三级联动数据（不带“全部”选项）
import { provinceAndCityData, regionData, CodeToText } from "element-china-area-data";
import { getServiceCityListApi } from "@/BMViews/api/work/expert.js";
import {cityTree,inCityCodeClass,inAreaCodeClass} from "@/wss/utils/wss.js";
import { log } from 'mathjs';

export default {
  name: "expertAuth",
  components: { NewCard, SubBtn, Comdrawer, EditGoodField },
  data() {
    return {
      // 当前的状态
      currentStatus: true,
      //专家名单 未审核 审核成功 审核失败
      filterText: "0",
      activeTabClass: ['0','1'],//当前展开的
      // 分页参数
      pageing: { pageNum: 1, pageSize: 50, status: "0" },
      
      expertList: [],//获取的专家列表数据
      documentaryList: [],//跟单人员列表
      entityList:[],//获取的实体列表数据

      value: new Date(),
      //左侧菜单高亮
      highlight: true,
      //默认激活第一个
      activeMenu: "1",
      activeList: "1",

      //当前选中专家的id
      selectExpertId: "",
      //当前选中专家的个人信息
      selectExpertInfo: {},
      //当前选中专家的typeId
      typeId: "",
      areaType: "",//当前选中专家的typeId是什么类型的  1全国 3市 4镇区县 项目的才有
      noSelectValue:'',//不可编辑的时候的输入框

      goodFieldShow: false,//添加擅长领域显示隐藏
      selectProjectTypeOne: {},//当前选中的一级类别
      serviceCity: provinceAndCityData,//服务城市
      selectServiceCity:[],//选择的服务城市
      newAreaSelect: '',//当前选择的最新的那个城市编码 镇区县用的
      //服务城市 配置项
      optionProps:{
        multiple: true,
        value: 'value',
        label: 'label',
        children: 'children'
      },

      //审核结果的数据收集
      auditResult: {
        skilledList: [],
        type: "1",
        // name: "", //专家名字
        // sex: "", //性别 0男 1女 2:未知s
        status: "0", //选择的是通过还是失败 状态 0是专家(通过) 1认证中 2认证失败(失败)
        permission: "0", //是否评论
        officeId: "", //职称id
        typeId: "", //类型id
        level: "", //专家等级
        followId: "",//跟单的id
        remark: "", //审核通知
      },

      filesRaw: [],//文件流列表

      //表单验证
      rules: {
        remark: [
          {
            required: true,
            message: "请选择审核结果",
            trigger: "change",
          },
        ],
        permission: [
          {
            required: true,
            message: "请选择是否评论",
            trigger: "change",
          },
        ],
        officeId: [
          {
            required: true,
            message: "请选择职称",
            trigger: "change",
          },
        ],
        level: [
          {
            required: true,
            message: "请选择等级",
            trigger: "change",
          },
        ],
        followId: [
          {
            required: true,
            message: "请选择跟单",
            trigger: "change",
          },
        ],
        advice: [
          {
            required: true,
            message: "请填写审核通知",
            trigger: "change",
          },
        ],
        type: [
          {
            required: true,
            message: "请选择类型",
            trigger: "change",
          },
        ],
        opinion: [
          {
            required: true,
            message: "请选择审核意见",
            trigger: "change",
          },
        ],
      },
      //职称的分页参数
      officePage: { pageNum: 1, pageSize: 50, type: 2 },
      //获取的专家职称列表数据
      officeList: [],
      //获取的专家类型列表数据
      officeTypeList: [],
      //获取的专家等级列表数据
      levelList: [],

      // 审核通知分页
      messagePageing: { pageNum: 1, pageSize: 50, type: "6" },
      // 审核失败分页
      losePageing: { pageNum: 1, pageSize: 50, type: "5" },
      //获取的审核通知模板
      messageTemp: {},
      //获取的审核失败模板
      loseTemp: {},
      //选择失败的审核模板
      getRemark: "",
      //选择成功的通知模板
      getMessage: "",
      // 当前的服务地区
      serverCity: "",

      province: "", //省
      city: "", //市
      location: "", //区

      isCheck: true,// 判断当前是否专家审核是否已经返回请求
    };
  },
  mounted() {
    this.getExpertListFn(); //获取专家列表
    this.getPrganizationlist_managerFn() // 获取实体列表
    this.getExpertOfficeTypeList(); //获取专家类型列表数据
    // this.getServiceCityList(); //获取服务城市的数据
    this.getUserLevelList(); //获取专家等级列表
    this.getdocumentary() // 获取跟单人员列表的数据
    this.getMessageTempList(); //专家审核通知模板获取
    this.getLoseTempList(); //专家审核失败模板获取

    // 通知专家认证页面关闭抽屉
    this.$bus.$on('closeGoodFieldBus',(id)=>{
      // 有id传过来说明是要重新获取专家数据
      if(id){
        this.selectId(id) //刷新数据
      }
      this.goodFieldShow = false
    })

    // 未审核的把修改的擅长领域给会专家认证页面
    this.$bus.$on('getEditGoodField',(data,state)=>{
      // data数据, state=zx咨询 state=xm项目
      if(state=='zx'){
        this.selectExpertInfo.skilledList = data
      }else{
        this.selectExpertInfo.projectRuleList = data
      }
      this.goodFieldShow = false
    })
  },
  beforeDestroy(){
    // 销毁
    this.$bus.$off('closeGoodFieldBus')
    this.$bus.$off('getEditGoodField')
  },
  methods: {
    // 状态发生改变
    auditResultStatusChange(item) {
      this.getRemark = "";
    },
    // 下拉
    selectChangeFn(val) {
      const _this = this;
      _this.pageing.status = val;
      val == 1 || val == 2
        ? (_this.currentStatus = false)
        : (_this.currentStatus = true);
      _this.selectExpertInfo = {};

      _this.getExpertListFn();
      // console.log(val, "行吧");
    },

    //当前选中专家的信息
    async selectId(id) {
      this.selectExpertId = id;
      await this.getExpertInfoFn(); //点击专家获取专家认证信息
      this.getExpertOfficeList(); //获取专家职称列表数据
      this.selectProjectTypeOne = {} //先清除数据
 
      // type=='3'项目专家的时候要判断 当前选中专家的typeId是什么类型的  1全国(无限制) 3市 4镇区县
      // 根据擅长领域的cityCode 没有cityCode是无限制 cityCode最后两位是00的是市 最后一种是镇区县
      if(this.selectExpertInfo.type=='3'){
        await this.getProjectTypeGetInfo(this.selectExpertInfo.typeId)//获取当前项目选中的一级类别数据
        let ruleList = []
        let cnList = []
        if(this.selectExpertInfo.projectRuleList){
          this.selectExpertInfo.projectRuleList.forEach(item=>{
            if(item.cityCode=='cn'){
              cnList.push(item.cityCode)
            }else{
              ruleList.push(item.cityCode)
            }
          })
        }

        // 当areaType=='3' 在这里获取当前专家选择的一级类别typeid查询这个一级类别的城市列表
        if(this.areaType=='3'){
          // 把专家选择的城市回显到服务地区那里
          let arr = ruleList.join(',').split(/[,,，]/)
          let cityList = [...new Set(arr)] //去重
          // selectServiceCity 把这些数据加到这里面
          this.selectServiceCity = [] //先清除之前的数据
          cityList.forEach((item) => {
            let arr = [];
            arr.push(item.substring(0,2)+'0000');
            arr.push(item);
            this.selectServiceCity.push(arr);
          });
        }else if(this.areaType=='4'){
          // 选择镇的时候
          let arr = ruleList.join(',').split(/[,,，]/)
          let cityList = [...new Set(arr)] //去重
          // selectServiceCity 把这些数据加到这里面
          this.selectServiceCity = [] //先清除之前的数据
          let seleCityList = []
          cityList.forEach((item) => {
            let arr = [];
            arr.push(item.substring(0,2)+'0000');
            arr.push(item.substring(0,4)+'00');
            arr.push(item);
            seleCityList.push(arr);
          });
          this.selectServiceCity = seleCityList
        }
      }
      // type=='3'项目专家的时候要判断 当前选中专家的typeId是什么类型的  1全国(无限制) 3市 4镇区县 end
    },

    // 根据id查询项目的数据
    async getProjectTypeGetInfo(id){
      let result = await getProjectTypeGetInfoApi({id})
      if(result.code==200){
        if(result.data){
          this.selectProjectTypeOne = result.data
          this.areaType = result.data.areaType
          if(result.data.areaType == '3'){
            // 把服务地区的选择数据改成 市 的数据
            this.serviceCity = provinceAndCityData
          }else if(result.data.areaType == '4'){
            console.log(result.data.areaType,'xxxxxxxxxxxxxx');
            // 把服务地区的选择数据改成 镇区县 的数据
            this.serviceCity = regionData
          }
        }
        // this.serviceCity = inCityCodeClass(result.data.cityCode)
      }
    },

    //确认提交按钮
    async expertEdit() {
      // 判断实体列表是否为空
      if(this.selectExpertInfo.organizationIds&&this.selectExpertInfo.organizationIds.length==0){
        this.$message({message: '绑定实体不能为空',type: 'warning'});
        return
      }

      await this.$refs.form.validate();
      //专家认证提交
      this.getExpertEdit();
    },

    //获取当前选中的审核失败模板
    changeRemark(id) {
      this.getRemark = this.loseTemp.find((v) => id == v.id).title;
    },
    //获取当前选中的审核通知模板
    changeMessage(id) {
      this.getMessage = this.messageTemp.find((v) => id == v.id).title;
    },

    //获取专家列表
    async getExpertListFn() {
      let result = await getExpertListApi(this.pageing);
      if (result.code != 200) return;
      // console.log(result);
      this.pageing.total = result.total;
      this.expertList = result.rows;
    },

    // 获取实体列表
    async getPrganizationlist_managerFn() {
      let { code, rows } = await getPrganizationlist_managerApi();
      if (code != 200) return;
      this.entityList = JSON.parse(JSON.stringify(rows));
    },

    // 点击专家获取专家认证信息
    async getExpertInfoFn() {
      let { selectExpertId } = this;
      let result = await getExpertInfoApi(selectExpertId);
      if (result.code != 200) return;
      //   console.log(result.data);
      this.selectExpertInfo = result.data;
      //获取专家的typeId
      // this.typeId = this.selectExpertInfo.typeId;
      this.typeId = this.selectExpertInfo.type;

      // 服务地区 *****
      if(this.selectExpertInfo.cityCode){
        return
        let cityCodeList = this.selectExpertInfo.cityCode.split(",");
        // CodeToText[item]
        cityCodeList.forEach((item) => {
          let arr = [];
          arr.push(undefined);
          arr.push(item);
          this.selectServiceCity.push(arr);
        });
        // this.serverCity = arr.join("；");
      }
      // 服务地区 ***** end

      // province: "",//省 city: "",//市 location:"",//区
      this.province =
        CodeToText[this.selectExpertInfo.location.slice(0, 2) + "0000"];
      this.city = CodeToText[this.selectExpertInfo.location.slice(0, 4) + "00"];
      this.location = CodeToText[this.selectExpertInfo.location];

      this.auditResult.skilledList = this.selectExpertInfo.skilledList;
      // console.log(this.auditResult.skilledList);

      //把已上传的图片转成文件流的形式 fileRaw *****************
      if(this.selectExpertInfo.expertFileList){
        this.filesRaw = []
        this.selectExpertInfo.expertFileList.forEach((item) => {
          //获取文件名称
          let fileName = item.url.substring(item.url.lastIndexOf("/") + 1);
          //转成文件流
          // UrltoFile(item.url,(file) => {
          //   this.filesRaw.push(file)
          // },fileName);
          //转成文件流
          getFileFromUrl(item.url,fileName)
          .then((response)=>{
              let file = response
              this.filesRaw.push(file);
          })
        });
      }

    },

    //获取专家职称列表数据
    async getExpertOfficeList() {
      let officePage = this.officePage;
      // 认证里面1和2 是咨询和编辑，3是项目；专家设置5是咨询，6是项目
      if(this.selectExpertInfo.type == '3'){
        officePage.type = 6;
      }else{
        officePage.type = 5;
      }
      officePage.pid = this.selectExpertInfo.typeId //通过pid查对应的职称
      let result = await getExpertOfficeListApi(officePage);
      if (result.code != 200) return;
      //专家类型的type 用于过滤专家职称
      setTimeout(() => {
        let typeId = this.selectExpertInfo.typeId;
        let list = result.rows;
        this.officeList = list.filter((item) => item.pid === typeId);
      }, 200);
      // this.officeList = result.rows
    },

    //获取运营城市列表
    async getServiceCityList(){
      const { pageNum, pageSize } = this.pageing;
      let result = await getServiceCityListApi()
      if(result.code==200){
        this.serviceCity = cityTree(result.rows)
      }
    },

    // 选择展开节点的时候 点击城市
    expandChangeArea(arr){
      if(arr[1]){
        this.newAreaSelect = arr[1]
      }
    },

    //选择服务地区的回调
    handleServiceCity(){
      let newSelected = [] //过滤出来的数组
      let newCityCode = [] //过滤出来的编码组
      if(this.areaType=='4'){
        // 只能选择一个城市的数据，在选择的时候把其他城市的数据清掉，只保留最新一个城市的镇区数据
        if(this.newAreaSelect != ''){
          // 对比城市，只留最新的那个城市的数据
          let lastCode = this.newAreaSelect
          newSelected = this.selectServiceCity.filter(item=>{
            return item[1] == lastCode
          })
        }else{
          newSelected = this.selectServiceCity
        }
      }
      // 选择镇区的时候直接添加进入
      if(this.areaType=='4'){
        newSelected.forEach(item=>{
          newCityCode.push(item[item.length-1])
        })
      }else if(this.areaType=='3'){
        // 选择市的时候
        newSelected = this.selectServiceCity
        newSelected.forEach(item=>{
          newCityCode.push(item[item.length-1])
        })
      }

      // this.selectExpertInfo.cityCode = newCityCode.join(',')
      // 把选择的城市放到擅长领域里面去
      if(this.selectExpertInfo.projectRuleList){
        this.selectExpertInfo.projectRuleList.forEach(item=>{
          item.cityCode = newCityCode.join('，')
        })
      }

      // 当前是审核成功的才去修改数据
      if(this.filterText == '1'){
        let data = {
          projectRuleList: this.selectExpertInfo.projectRuleList
        }
        this.editUpdateExpert(data) //修改专家认证信息的接口
      }
    },

    // 修改专家绑定的实体列表
    async changeOrganization(){
      // 判断实体列表是否为空
      if(this.selectExpertInfo.organizationIds&&this.selectExpertInfo.organizationIds.length==0){
        this.$message({message: '绑定实体不能为空',type: 'warning'});
        return
      }
      // 当前是审核成功或者失败的才去修改数据
      if(this.filterText != '0'){
        let data = {
          organizationIds: this.selectExpertInfo.organizationIds
        }
        this.editUpdateExpert(data) //修改专家认证信息的接口
      }
    },

    //获取专家类型列表数据
    async getExpertOfficeTypeList() {
      let officePage = this.officePage;
      officePage.type = 1;
      let result = await getExpertOfficeListApi(this.officePage);
      if (result.code != 200) return;
      // console.log(result);
      this.officeTypeList = result.rows;
    },

    //获取专家等级列表
    async getUserLevelList() {
      let result = await getUserLevelListApi();
      // console.log(result);
      this.levelList = result.rows;
    },

    // 获取跟单人员列表的数据
    async getdocumentary(){
      let result = await getdocumentaryApi()
      this.documentaryList = result.rows;
    },

    //专家审核通知模板获取
    async getMessageTempList() {
      let result = await getMessageTempListApi(this.messagePageing);
      // console.log(result.rows);
      this.messageTemp = result.rows;
    },

    //专家审核失败模板获取
    async getLoseTempList() {
      let result = await getMessageTempListApi(this.losePageing);
      // console.log(result.rows);
      this.loseTemp = result.rows;
    },

    //-----------------*********************专家认证提交-----------------************************************
    getExpertEdit: debounce(async function() {
      this.isCheck = false //先不给再次点击确认

      let auditResult = this.auditResult;
      let formDate = new FormData();

      let selectExpertInfo = this.selectExpertInfo;

      for (const key in selectExpertInfo) {
        if (typeof selectExpertInfo[key] == "object") {
          if (key == "skilledList") {
            selectExpertInfo[key].forEach((item, index) => {
              formDate.append(`${key}[${index}].id`, item.id);
              formDate.append(`${key}[${index}].name`, item.name);
            });
          } else if (key == "projectRuleList") {
            // 项目的擅长领域
            selectExpertInfo[key].forEach((item, index) => {
              if(item.createBy) formDate.append(`${key}[${index}].createBy`, item.createBy);
              if(item.createTime) formDate.append(`${key}[${index}].createTime`, item.createTime);
              if(item.id) formDate.append(`${key}[${index}].id`, item.id);
              formDate.append(`${key}[${index}].expertId`, item.expertId);
              formDate.append(`${key}[${index}].name`, item.name);
              formDate.append(`${key}[${index}].typeId`, item.typeId);
              formDate.append(`${key}[${index}].userId`, item.userId);
              if(item.cityCode) formDate.append(`${key}[${index}].cityCode`, item.cityCode);
            });
          } else if (key == "expertCertificateList") {
            selectExpertInfo[key].forEach((item, index) => {
              formDate.append(`${key}[${index}].certificateId`, item.id);
              formDate.append(`${key}[${index}].createBy`, item.createBy);
              formDate.append(`${key}[${index}].createTime`, item.createTime);
              formDate.append(`${key}[${index}].expertId`, item.expertId);
              formDate.append(`${key}[${index}].id`, item.id);
              formDate.append(`${key}[${index}].name`, item.name);
              formDate.append(`${key}[${index}].no`, item.no);
              formDate.append(`${key}[${index}].isShow`, item.isShow);
            });
          } else if (key == "expertWorkList") {
            selectExpertInfo[key].forEach((item, index) => {
              formDate.append(`${key}[${index}].company`, item.company);
              formDate.append(`${key}[${index}].endTime`, item.endTime);
              formDate.append(`${key}[${index}].expertId`, item.expertId);
              formDate.append(`${key}[${index}].job`, item.job);
              formDate.append(`${key}[${index}].postion`, item.postion);
              formDate.append(`${key}[${index}].startTime`, item.startTime);
            });
          } else if (key == "expertEducationList") {
            selectExpertInfo[key].forEach((item, index) => {
              formDate.append(`${key}[${index}].endTime`, item.endTime);
              formDate.append(`${key}[${index}].major`, item.major);
              formDate.append(`${key}[${index}].expertId`, item.expertId);
              formDate.append(`${key}[${index}].school`, item.school);
              formDate.append(`${key}[${index}].startTime`, item.startTime);
              formDate.append(`${key}[${index}].type`, item.type);
              formDate.append(`${key}[${index}].userId`, item.userId);
            });
          } else if (key == "expertFileList") {
            selectExpertInfo[key].forEach((item, index) => {
              formDate.append(`${key}[${index}].expertId`, item.expertId);
              formDate.append(`${key}[${index}].id`, item.id);
              formDate.append(`${key}[${index}].name`, item.name);
              formDate.append(`${key}[${index}].url`, item.url);
            });
          }
        } else {
          formDate.set(key, selectExpertInfo[key]);
        }
      }
      
      //相关附件
      this.filesRaw.forEach((item, i) => {
        formDate.append(`file`, item);
      });
      
      formDate.set("avatar", selectExpertInfo.avatar);
      formDate.set("name", selectExpertInfo.name);
      formDate.set("sex", selectExpertInfo.sex);
      formDate.set("type", selectExpertInfo.type);
      formDate.set("expertType", selectExpertInfo.type); //专家type
      formDate.set("site", selectExpertInfo.site); //咨询类型
      formDate.set("organizationIds", selectExpertInfo.organizationIds);//绑定的实体

      formDate.set("status", auditResult.status);
      // formDate.set("permission", auditResult.permission);
      formDate.set("officeId", auditResult.officeId);
      formDate.set("level", auditResult.level);//等级
      formDate.set("followId", auditResult.followId);//跟单id
      formDate.set("remark", auditResult.remark);

      //打印formDate
      for (var key of formDate.entries()) {
        console.log(key[0] + ', ' + key[1]);
      }

      let result = await getExpertEditApi(formDate);

      if (result.code == 200) {
        this.$message({
          message: "提交成功",
          type: "success",
        });

        // 当前是通过状态的话要重新获取路由和权限信息
        if(auditResult.status == '1'){
          await getInfo()
          await getRouters()
        }
        this.getExpertListFn();

        this.isCheck = true //返回code 200才给点击
      } else {
        return Promise.reject(result.message);
      }
    },1000),
    //-----------------*********************专家认证提交-----------------**********************************end

    // -----------------*********************更新专家认证的接口-----------------*********************
    // 修改专家等级的时候
    handleLevel(){
      // 获取专家等级的名称
      let level = this.levelList.find(item=>{
        return item.id == this.selectExpertInfo.level
      })
      this.selectExpertInfo.levelName = level.levelName
      let data = {
        level: this.selectExpertInfo.level,
        levelName: this.selectExpertInfo.levelName
      }
      // 当前是审核成功的才去修改数据
      if(this.filterText == '1'){
        this.editUpdateExpert(data) //修改专家认证信息的接口
      }
    },

    // 修改专家职称的时候
    handleOffice(){
      // 获取专家职称的名称
      let office = this.officeList.find(item=>{
        return item.id == this.selectExpertInfo.officeId
      })
      this.selectExpertInfo.officeName = office.name

      let data = {
        officeId: this.selectExpertInfo.officeId,
        officeName: this.selectExpertInfo.officeName
      }
      // 当前是审核成功的才去修改数据
      if(this.filterText == '1'){
        this.editUpdateExpert(data) //修改专家认证信息的接口
      }
    },

    // 修改跟单的时候
    handleDocumentary(){
      // 当前是审核成功的才去修改数据
      if(this.filterText == '1'){
        let data = {
          followId: this.selectExpertInfo.followId
        }
        this.editUpdateExpert(data) //修改专家认证信息的接口
      }
    },

    //更新专家认证的接口
    editUpdateExpert: debounce(async function(data){
      if(!this.selectExpertInfo.id){
        this.$message({message: '请选择专家',type: 'warning'});
        return
      }

      // 用form表单提交
      let formDate = new FormData();
      formDate.set("id", this.selectExpertInfo.id);

      // 如果有城市的数据就去修改
      if(data.projectRuleList){
        data.projectRuleList.forEach((item, i) => {
          if(item.cityCode) formDate.append(`projectRuleList[${i}].cityCode`, item.cityCode);
          formDate.append(`projectRuleList[${i}].expertId`, item.expertId);
          formDate.append(`projectRuleList[${i}].name`, item.name);
          formDate.append(`projectRuleList[${i}].typeId`, item.typeId);
          formDate.append(`projectRuleList[${i}].userId`, item.userId);
        });
      }

      //如果有跟单就去修改
      if(data.followId){
        formDate.set("followId", data.followId);
      }

      // 如果有职称数据就去修改
      if(data.officeId){
        formDate.set("officeId", data.officeId);
        formDate.set("officeName", data.officeName);
      }

      // 如果有专家等级的数据就去修改
      if(data.level){
        formDate.set("level", data.level);
        formDate.set("levelName", data.levelName);
      }

      // 如果有实体列表的数据就去修改
      if(data.organizationIds){
        formDate.set("organizationIds", data.organizationIds);
        formDate.set("type", this.selectExpertInfo.type);
        formDate.set("userId", this.selectExpertInfo.userId); 
        if(this.selectExpertInfo.level){
          formDate.set("level", this.selectExpertInfo.level); 
        }
      }

      //打印formDate
      for (var key of formDate.entries()) {
        console.log(key[0] + ', ' + key[1]);
      }

      // 发送请求
      let result = await editUpdateExpertApi(formDate)
      if(result.code == 200){
        this.$message({message: '编辑成功',type: 'success'});
        this.selectId(this.selectExpertInfo.id) //刷新数据
      }
    },300),
    // -----------------*********************更新专家认证的接口-----------------*********************end

    // ------------------------添加擅长领域------------------------
    // 点击添加擅长领域
    addGoodField(){
      this.goodFieldShow = true
    },
    // 关闭添加擅长领域
    goodFieldColse(){
      this.goodFieldShow = false
    },
    // ------------------------添加擅长领域------------------------end

    // 获取跟单人员姓名
    getDocumentaryName(){
      let followId = this.selectExpertInfo.followId
      let obj = this.documentaryList.find(item=>{
        return item.userId == followId
      })
      let name = ''
      if(obj){
        name = obj.userName
      }
      return name
    },
  },
  computed: {
    //左侧下拉框筛选 咨询专家
    consultFList() {
      return this.expertList.filter((item) =>{
        if(item.type){
          return JSON.stringify(item.status).includes(this.filterText) && JSON.stringify(item.type).includes('2')
        }
      });
    },

    //左侧下拉框筛选 项目专家
    projectFList() {
      return this.expertList.filter((item) =>{
        if(item.type){
          return JSON.stringify(item.status).includes(this.filterText) && JSON.stringify(item.type).includes('3')
        }
      });
    },

    //获得省份
    getProvince() {
      return CodeToText[this.selectExpertInfo.province];
    },
    //获得城市
    getCity() {
      return CodeToText[this.selectExpertInfo.city];
    },
    //计算年龄
    getAge() {
      if (this.selectExpertInfo.birthday) {
        let year = new Date().getFullYear();
        let byear = this.selectExpertInfo.birthday.split("-");
        return year - Number(byear[0]);
      }
    },

    //获得专家类型
    getTypeName() {
      if (this.selectExpertInfo.type == "1") {
        return "编辑专家";
      } else if (this.selectExpertInfo.type == "2") {
        return "咨询专家";
      } else {
        return "项目专家";
      }
    },
  },
};
</script>

<style scoped>
h3,
h4,
p,
ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.label-box-content {
  height: 100%;
}
.el-input-number--mini {
  width: 100px;
}
.el-card >>> .top {
  border-bottom: 0;
  padding-top: 0;
}
.el-card >>> .el-card__body {
  position: relative;
  height: 100%;
}
.el-card >>> .el-card__body > div {
  padding-top: 0 !important;
  height: 92%;
  overflow-y: auto;
}
.corrExpert .el-card >>> .el-card__body > div {
  overflow-y: initial;
}
.el-card >>> .el-card__body > div::-webkit-scrollbar {
  width: 0;
}

.el-row,
.el-card {
  height: 100%;
  margin-bottom: 0;
}
.label-box-content >>> h1 {
  margin: 0;
  padding: 20px 0 15px 0;
  border-bottom: 1px solid #e6ebf5;
}
.label-box-content >>> .top::after {
  height: 0;
}

/* 专家分类样式 */
.expertsCategory >>> .el-card__body{
  padding: 0;
}
.expertsCategory >>> .el-card__body .top{
  margin: 0 30px;
}
.expertsCategory >>> .el-card__body .top h1{
  border-bottom: 0;
}
.classGroup_box{
  
}
.classifyEmpty{
  font-size: 12px;
  color: #999;
  text-align: center;
  padding-top: 15px;
}
.expertsCategory .el-collapse{
  border-top: 1px solid #f3f3f3;
}
.expertsCategory >>> .el-collapse-item__header{
  height: 42px;
  line-height: 42px;
  border-bottom: 1px solid #f3f3f3;
  padding: 0 30px;
  background-color: #f9f9f9;
  font-size: 14px;
  color: #666;
}
.expertsCategory >>> .el-collapse-item__wrap{
  border-bottom: 1px solid #f3f3f3;
}
.expertsCategory >>> .el-collapse-item__content{
  padding-bottom: 15px;
}
/* 专家分类样式 end*/

/* 左侧菜单 */
.leftMenu {
}
.el-menu {
  border-right: 0;
}
.el-menu-item {
  height: 44px;
  line-height: 44px;
  border-radius: 4px;
  padding: 0 30px !important;
}
.el-menu-item:hover,
.el-menu-item.is-active {
  background-color: #ebecf0;
  color: #fff;
}
.el-menu-item > span {
  display: flex;
  justify-content: space-between;
  align-content: center;
  color: #2e3f5e;
}
.el-menu-item > span .auditTxt {
  font-size: 13px;
  color: #666;
}
.el-menu-item.is-active .auditTxt .el-icon-warning {
  color: #ffba00;
}
.el-menu-item.is-active .auditTxt .el-icon-success {
  color: #67c23a;
}
.el-menu-item.is-active .auditTxt .el-icon-error{
  color: #f56c6c;
}
.leftMenu .leftSearch {
  position: absolute;
  right: 20px;
  top: 10px;
  z-index: 9;
}
.leftMenu >>> .el-input--medium .el-input__inner {
  width: 95px;
  padding: 0 8px;
}
.el-menu-item:hover .el-icon-success {
  color: #67c23a;
}
.el-menu-item:hover .el-icon-warning {
  color: #ffba00;
}
.el-menu-item:hover .el-icon-error {
  color: #f56c6c;
}
/* 左侧菜单 end*/

/* 中间个人信息 */
.infoExpert {
  height: 100%;
}
.el-col{
  transition: all 0.5s;
}
.el-col-24 {
  margin-top: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e6ebf5;
}
.expertInfoImg {
  display: flex;
  align-items: center;
}
.expertInfoImg h1 {
  border-bottom: 0;
}
.expertInfoImg h1 > span {
  font-weight: 400;
  font-size: 16px;
  color: #7d7d7d;
}
.expertInfoImg img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 50%;
}
.expertInfoImg h1 {
  font-weight: bold;
  font-size: 20px;
  margin-left: 20px;
}

.info-box h3 {
  font-size: 16px;
  font-weight: 600;
  color: #2e3f5e;
  margin-bottom: 20px;
}
.info-box h4 {
  color: #666;
  font-size: 14px;
  margin-bottom: 15px;
}
.info-box li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: 14px;
  margin-bottom: 15px;
}
.info-box li > span {
  display: block;
  width: 15%;
  color: #999999;
}
.info-box li > p {
  width: 85%;
  font-size: 14px;
  font-weight: 400;
  color: #222;
}
.info-box li > p >.el-cascader{
  width: 100%;
}
.info-box li > p>i{
  font-size: 16px;
  color: #f87a23;
  cursor: pointer;
}

.file-p {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}
.fileBtn {
  color: #f87a23;
  font-size: 14px;
  padding: 0;
  margin-left: 10px;
}
.showImg {
  position: relative;
  display: block;
  width: 28px;
  height: 16px;
  margin-right: 10px;
}
.showImg .el-image {
  position: absolute;
  left: 10px;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.el-descriptions .el-descriptions-item__label {
  margin-right: 0;
  width: 100px;
}
.perInfo >>> .el-descriptions__title {
  font-size: 18px;
}
.el-image {
  width: 250px;
  height: 170px;
  border-radius: 10px;
}
.certTitle {
  font-size: 20px;
}
.el-checkbox
  >>> .el-checkbox__input.is-disabled.is-checked
  .el-checkbox__inner {
  background-color: #e8f4ff;
  border-color: #6c95f4;
}
.el-checkbox
  >>> .el-checkbox__input.is-disabled.is-checked
  .el-checkbox__inner::after {
  border-color: #1c91ff;
}
.el-checkbox >>> .el-checkbox__input.is-disabled + span.el-checkbox__label {
  color: #666;
}

.workExp {
  margin-top: 15px;
}
.workExp h2 {
  margin-top: 0;
  font-size: 16px;
  margin-bottom: 5px;
  font-weight: bold;
}
.workExp h2 > span {
  font-size: 14px;
  font-weight: 400;
  margin-left: 10px;
  color: #7d7d7d;
}
.workExp i {
  color: #7d7d7d;
  font-size: 13px;
}
.workExp ol {
  padding-left: 20px;
  margin-top: 10px;
}
.workExp ul {
  padding: 0;
}
.workExp li {
  font-size: 14px;
  line-height: 28px;
  list-style: none;
}
.historyInfo {
  margin-top: 0;
  font-size: 14px;
  line-height: 28px;
}
/* 中间个人信息end */

/* 专家审核 样式 */
.el-select {
  width: 100%;
}
.opinion {
  position: relative;
}
.opinion .el-select {
  position: absolute;
  z-index: 999;
  top: 50px;
  height: 110px;
  opacity: 0;
}
.opinion >>> textarea {
  font-family: Microsoft Yahei;
  font-size: 14px;
  margin-top: 15px;
}
.expertRev {
  margin-top: 20px;
  margin-bottom: 60px;
}
.el-form >>> .el-form-item .el-form-item__label {
  padding: 0;
}
.expertRev >>> .el-form-item__content {
  position: initial;
}
.expertRev .el-button {
  position: absolute;
  top: 10px;
  right: 20px;
  padding: 8px 10px;
  font-size: 13px;
}

>>> .el-radio__input.is-checked .el-radio__inner {
  border-color: #f87a23;
  background: #f87a23;
}
>>> .el-radio__input.is-checked + .el-radio__label {
  color: #f87a23;
}

/* 右侧按钮样式 */
::v-deep .subBtn {
  padding: 8px 30px !important;
  height: 50px;
  z-index: 99;
}
::v-deep .subBtn > .el-button {
  width: 100px;
  padding: 8px 0 !important;
  font-size: 14px;
  color: #606e84;
}
::v-deep .subBtn > .el-button.el-button--primary {
  background-color: #f87a23;
  border-color: #f87a23;
  color: #fff;
}
/* 专家审核 end*/
</style>
<style lang="scss">
// selectArea是自定义浮层类目
.selectArea{
  .el-cascader-panel {
    .el-scrollbar:first-child {
      .el-checkbox {
        display: none;
      }
    }
    .el-scrollbar:nth-child(2) {
      .el-checkbox {
        display: none;
      }
    }
  }
}
</style>